package constants

import "sjy/customcmd/src/utils"

type InfomationSt struct {
	Ps1Help           string `json:"ps1help"`
	GiteeMaster       string `json:"gitee_master"`
	GiteeMasterReadme string `json:"gitee_master_readme"`
}

var Infomation = buildInfomation()

func buildInfomation() *InfomationSt {
	var obj *InfomationSt
	err := utils.LoadJsonError(InfomationPath, &obj, func(err error) {})
	if err != nil || obj == nil {
		return &InfomationSt{
			Ps1Help:           "https://gitee.com/mdsSJY/custom-cmd",
			GiteeMaster:       "",
			GiteeMasterReadme: "",
		}
	}

	return obj
}
